home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / airfox.swf / scripts / frame_8 / PlaceObject2_309_131 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-13  |  2.8 KB  |  93 lines

  1. onClipEvent(enterFrame){
  2.    if(_name != "enemy")
  3.    {
  4.       if(330 < _Y)
  5.       {
  6.          removeMovieClip("_root.es" + this._name);
  7.          removeMovieClip(this);
  8.       }
  9.       if(_Y < -100)
  10.       {
  11.          removeMovieClip("_root.es" + this._name);
  12.          removeMovieClip(this);
  13.       }
  14.       setProperty("_root.es" + this._name, _X, _X / 8 + 248);
  15.       setProperty("_root.es" + this._name, _Y, _Y / 8 + 18);
  16.       if(this.hitTest(_root.ship) && _root.shippause == 0 && _root.shield == 0)
  17.       {
  18.          _root.ship._alpha = 0;
  19.          _root.explosioncount = _root.explosioncount + 1;
  20.          duplicateMovieClip(_root.explosion,"explosion" + _root.explosioncount,16384 + _root.explosioncount);
  21.          setProperty("_root.explosion" + _root.explosioncount, _X, _root.ship._x);
  22.          setProperty("_root.explosion" + _root.explosioncount, _Y, _root.ship._y);
  23.          if(_root.explosioncount >= 4070)
  24.          {
  25.             _root.explosioncount = 4050;
  26.          }
  27.          _root.shipcount--;
  28.          _root.displaycount = 0;
  29.          removeMovieClip("_root.es" + this._name);
  30.          _root.dragger._y = -150;
  31.          _root.ship._y = -150;
  32.          removeMovieClip(this);
  33.       }
  34.       i = 2000;
  35.       while(2010 >= i)
  36.       {
  37.          if(hitTest("_root." + i))
  38.          {
  39.             removeMovieClip("_root." + i);
  40.             killthis = 1;
  41.             addhit++;
  42.          }
  43.          i++;
  44.       }
  45.       if(allowfire == 0 && killthis == 1)
  46.       {
  47.          killthis = 0;
  48.          _root.explosioncount = _root.explosioncount + 1;
  49.          duplicateMovieClip(_root.explosion,"explosion" + _root.explosioncount,16384 + _root.explosioncount);
  50.          setProperty("_root.explosion" + _root.explosioncount, _X, _X);
  51.          setProperty("_root.explosion" + _root.explosioncount, _Y, _Y);
  52.          if(_root.explosioncount >= 4070)
  53.          {
  54.             _root.explosioncount = 4050;
  55.          }
  56.          if(deathlevel == 0)
  57.          {
  58.             removeMovieClip("_root.es" + this._name);
  59.             removeMovieClip(this);
  60.             allowfire = 1;
  61.             _root.score += 20;
  62.          }
  63.          if(deathlevel == 1)
  64.          {
  65.             if(addhit >= 3)
  66.             {
  67.                removeMovieClip("_root.es" + this._name);
  68.                removeMovieClip(this);
  69.                _root.score += 40;
  70.             }
  71.          }
  72.          if(deathlevel == 2)
  73.          {
  74.             if(addhit >= 6)
  75.             {
  76.                removeMovieClip("_root.es" + this._name);
  77.                removeMovieClip(this);
  78.                _root.score += 80;
  79.             }
  80.          }
  81.          if(deathlevel == 3)
  82.          {
  83.             if(addhit >= 8)
  84.             {
  85.                removeMovieClip("_root.es" + this._name);
  86.                removeMovieClip(this);
  87.                _root.score += 100;
  88.             }
  89.          }
  90.       }
  91.    }
  92. }
  93.